import fetch from '@/utils/fetch'

export function getDevRoomStatus(areaId, params) {
	return fetch({
	    url: '/device/v1/mgt/device_room_status',
	    method: 'get',
		headers: {'x-area-id': areaId},
	    params
  	})
}

export function getDevRoomParasStatus(devRoomId) {
	return fetch({
	    url: `/device/v1/mgt/device_room/${devRoomId}/para_status`,
	    method: 'get'
  	})
}

export function getDevParaLog(devParaId, params) {
	return fetch({
	    url: `/device/v1/mgt/device_room/para/${devParaId}/log`,
	    method: 'get',
	    params
	})
}

export const devRoomStatusType = {
	0: "正常",
	1: "告警",
	2: "严重告警"
}

//拉取摄像头基础配置数据1
export function getCamera(device_room_id){
	return fetch({
		url:`/device/v1/mgt/device_room/${device_room_id}/camera/v`,
		method:"get"
	})
}
//拉取摄像头基础配置数据2
// export function getCamera(host,channel,protocol){
// 	return fetch({
// 		url:`http://${host}/api/v1/getchannelstream?channel=${channel}&protocol=${protocol}`,
// 		method:"get"
// 	})
// }